Total Critical Area For Optimizing Test Patterns